import { http } from '@/utils/request'

// 添加成员
export function addFamilyMember(data: any) {
  return http.request({
    url: `/small/myFamilyMember/addFamilyMember`,
    method: 'POST',
    data
  })
}

// 修改成员
export function updateFamilyMember(data: any) {
  return http.request({
    url: `/small/myFamilyMember/updateFamilyMember`,
    method: 'POST',
    data
  })
}

// 成员列表
export function getMyFamilyMemberList() {
  return http.request({
    url: `/small/myFamilyMember/selectMyFamilyMemberList`,
    method: 'GET'
  })
}

// 成员详情
export function myFamilyMemberDetail(id: string | number) {
  return http.request({
    url: `/small/myFamilyMember/myFamilyMemberDetail/${id}`,
    method: 'GET'
  })
}

// 切换成员
export function changeFamilyMember(familyMemberId: string | number) {
  return http.request({
    url: `/small/myFamilyMember/changeFamilyMember/${familyMemberId}`,
    method: 'GET'
  })
}

// 删除成员
export function deleteFamilyMember(id: string | number) {
  return http.request({
    url: `/small/myFamilyMember/deleteFamilyMember/${id}`,
    method: 'DELETE'
  })
}
